package io.geekidea.boot.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@Schema(description = "资源数据")
public class Resource implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @TableField(value = "name", insertStrategy = FieldStrategy.NOT_EMPTY)
    private String name = "default_name";

    private String version;

    @TableField("resource_type_code")
    private String resourceTypeCode;

    private String grade;

    @TableField("className")
    private String className;

    private String remark;

    @TableField("file_name")
    private String fileName;

    @TableField("file_path")
    private String filePath;

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getFilePath() {
        return this.filePath;
    }

    @TableField("file_size")
    private Long fileSize;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

}
